import Vue from 'vue'
import VueI18n from 'vue-i18n'
import elemnetZh from 'element-ui/lib/locale/lang/zh-CN'
import elemnetEn from 'element-ui/lib/locale/lang/en.js'
import zh from './zh.js'
import en from './en.js'
import cookie from 'js-cookie'
Vue.use(VueI18n)
export default new VueI18n({
  locale: cookie.get('lang') || 'zh', // 指定语言类型
  messages: { // 语言包
    zh: {
      title: '这是中文',
      ...elemnetZh,
      ...zh
    },
    en: {
      title: 'this is english',
      ...elemnetEn,
      ...en
    }
  }
})
